Code generation and allocation method

ABSTRACT

A method of generating and allocating codewords includes allocating one of two selectable codewords b 1  and b 2  as codeword “b” when a preceding codeword “a” and a following codeword “b” form a code stream X, in which the codewords b 1  and b 2  have opposite INV values which are parameters indicating whether the number of ‘1s’ contained in a codeword is an odd number or an even number. When the code stream of the preceding codeword “a” and the following codeword b 1  is X 1,  and when the code stream of the preceding codeword “a” and the following codeword b 2  is X 2,  the codewords are allocated such that the INV values of X 1  and X 2  are maintained to be opposite when the preceding codeword “a” or the following codeword b 1  (b 2 ) (b 1  or b 2 ) should be replaced by another codeword in compliance with a predetermined boundary condition given between codewords. The codewords are allocated so that a DC suppression capability of the code stream can be maintained.

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application claims the benefit of U.S. patent applicationSer. No.10/125,564, filed Apr. 19, 2002 in the United States Patent andTrademark Office, the disclosure of which is hereby incorporated hereinby reference. This application also claims the benefit of Korean PatentApplication No. 2001-21360, filed Apr. 20, 2001 in the Korean IndustrialProperty office, the disclosure of which is incorporated herein byreference.

BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention

[0003] The present invention relates to a method of generating andallocating modulation codes of source codes to be recorded on arecording medium, and more particularly, to a method of generatingcodewords with a restricted run length and allocating the generatedcodewords to form a code stream so that a DC control characteristic ofthe code stream is maintained.

[0004] 2. Description of the Related Art

[0005] In a Run Length Limited (RLL) code represented by (d, k, m, n),the performance of a code is evaluated mainly based on a recordingdensity and a capability to suppress a DC component of the code. Here,“m” denotes the number of data bits (the number of so-called source databits, which is also referred to as the number of information word bits),“n” denotes the number of codeword bits after modulation (the number ofso-called channel bits) of the source data bits, “d” denotes the minimumnumber of a series of ‘0s’ that can exist between ‘1’ and ‘1’ in acodeword, and “k” denotes the maximum number of a series of ‘0s’ thatcan exist between ‘1’ and ‘1’ in a codeword. An interval between thecodeword bits in a codeword is represented by T.

[0006] A modulation method, to improve a recording density, is used toreduce the number of the codeword bits “n” while regarding “d” and “m”as given conditions. In the RLL code, however, “d”, which is the minimumnumber of a series of ‘0s’ that can exist between ‘1’ and ‘1’ in acodeword, and “k”, which is the maximum number of a series of ‘0s’ thatcan exist between ‘1’ and ‘1’ in a codeword, should be satisfied. If,with this (d, k) condition satisfied, the number of data bits is “m”,the number of codewords satisfying RLL(d, k) should be equal to orgreater than 2^(m). Moreover, in order to actually use this code, runlength constraints, that is, RLL(d, k) conditions, should be satisfiedin a part where a codeword is linked to another codeword. In addition,when the DC component of a code affects the system performance, it isdesirable to use a code which has a DC suppression capability.

[0007] The main reason for suppressing the DC component in the RLLmodulated code stream is to minimize an effect of a reproducing signalon a servo band. Hereinafter, methods of suppressing the DC componentwill be referred to as Digital Sum Value (DSV) control methods.

[0008] The DSV control methods can be broadly classified into two types.One is a method having a DSV control code itself, where the DSV controlcode is capable of controlling a DSV. The other one is a method ofinserting a merge bit at each DSV control time. An Eight to FourteenModulation plus (EFM+) code performs DSV control using a separate codetable while the EFM code or a (1, 7) code performs the DSV control byinserting the merge bit.

[0009] Therefore, the shape of the prior art modulation code grouphaving the DSV control code itself capable of controlling suppression ofthe DC component and satisfying the conditions described above is asshown in FIG. 1, in which each of a predetermined number of mainconversion code groups has a corresponding code group for controllingsuppression of the DC component. Each main conversion code group and thecorresponding code group form a pair so that the DC component can besuppressed and controlled. In this case, there are some characteristicsin the codewords of predetermined main conversion code groups. That is,there are no identical codewords between the main conversion code groupsA and B. If duplicated codes are used, there might be the mainconversion code groups C and D for demodulating the duplicated codes,where there are no identical codewords between the main conversion codegroups C and D, but codewords in the main conversion code group A or Bmay be in the main conversion code group C or D for demodulatingduplicated codes. The number of codewords in the main conversion codegroups A and B and the main conversion code groups C and D fordemodulating duplicated codes is 2^(m) if the number of bits in thesource word before conversion is “m”.

[0010] If corresponding code groups E through H are DC suppressioncontrol code groups used for suppressing the DC components together withthe main conversion code groups A through D, respectively, thecharacteristics of codewords in each of the corresponding code groups Ethrough H are the same as the characteristics of codewords in the mainconversion code groups A through D, respectively. That is, the sameconditions for generating duplicated codewords or the same conditionsfor determining the number of lead zeros in a codeword are applied toeach of the DC suppression control code groups E through H forcontrolling suppression of DC components and the main conversion codegroups A through D.

[0011] For example, the characteristics of the EFM+ code, which is usedin current Digital Versatile Discs (DVD), has a run length condition ofRLL(2, 10) and a codeword length (n) of 16 bits, is as shown in FIG. 2.The main conversion code groups are MCG1 (“A” in FIG. 1) and MCG2 (“B”in FIG. 1) and the conversion code groups for demodulating duplicatedcodes are DCG1 (“C” in FIG. 1) and DCG2. (“D” in FIG. 1). There are fourDSV code groups (“E˜H” in FIG. 1) which make pairs with respectiveconversion code groups to control suppression of DC components. Thereare no identical codewords between the four conversion code groups andthe four DSV code groups which are code groups for controlling DCcomponents.

[0012] Also, the conditions for generating duplicated codewords in theentire code groups are the same, and the characteristics of codewords ineach code group pair that can control DC components (MCG1 and the firstDSV code group, MCG2 and the second DSV code group, DCG1 and the thirdDSV code group, or DCG2 and the fourth DSV code group) are the same.

[0013] That is, a codeword having a continuous sequence of from 2 to 5zeros from the Least Significant Bit (LSB) of the codeword is generatedusing duplicated codewords. This rule is applied to each code group inthe same manner. In each of the codewords of the first DSV code groupfor controlling suppression of DC components, which controls suppressionof DC components together with the main conversion code group MCG1,there is a continuous sequence of between 2 and 9 ‘0s’ from the MostSignificant Bit (MSB). In each of the codewords of the second DSV codegroup for controlling suppression of DC components, which controlssuppression of DC components together with the main conversion codegroup MCG2, there is either 0 or 1 ‘0’ continuing from the MSB.

[0014] Some bits (here, b15(MSB) or b3) in the codewords of the thirdDSV code group control the suppression of the DC components togetherwith the corresponding conversion code group DCG1 for demodulatingduplicated codes are ‘0b’, while some bits (here, b15(MSB) or b3) in thecodewords of the fourth DSV code group for controlling suppression of DCcomponents control the suppression of the DC components together withthe corresponding code group DCG2 for demodulating duplicated codes, andsome bits (here, b15(MSB) and b3) are ‘1b’. In developing 8 to 15modulation code which has an advantage in the recording density aspectcompared to the prior art modulation method EFM+ which uses themodulation code group shown in FIG. 1 or 2, the original characteristicsof a code stream change when a change occurs in a codeword because of aboundary rule applied to the locations adjacent to a boundary whichconnects a codeword to another codeword.

SUMMARY OF THE INVENTION

[0015] To solve the above and other problems, it is an objective of thepresent invention to provide a method of generating and allocatingcodewords having a run length restriction so that originalcharacteristics of a code stream are maintained without change even whena codeword is replaced according to a boundary rule when the code streamis allocated.

[0016] Additional objects and advantageous of the invention will be setforth in part in the description which follows and, in part, will beobvious from the description, or may be learned by practice of theinvention.

[0017] To achieve the above and other objects according to an embodimentof the present invention, there is provided a method of generating andallocating codewords of source words which are to be recorded on arecording medium, the method including generating codewords satisfyingpredetermined run length conditions and grouping codewords according toeach run length condition; and allocating the codewords such that acode(word) for the source word is capable of controlling suppression ofDC components.

[0018] It is preferable that when a predetermined boundary condition isnot satisfied in the code stream, allocating codewords such thatcodewords which satisfy the boundary condition and maintain the DCcontrol characteristics which are considered when the initial codewordsare allocated replace the initial codewords.

[0019] The generating of the codewords includes generating codewordssatisfying the length of a predetermined first codeword, andpredetermined run length conditions, grouping the codewords according toeach predetermined run length condition to generate a main conversioncodeword table; generating DC control codewords satisfying the length ofa predetermined second codeword, and predetermined run length conditionsin order to control DC components in the code(word) stream, grouping theDC control codewords, and generating a code conversion table forcontrolling DC components; and generating additional DC controlcodewords by taking codewords which satisfy the predetermined run lengthconditions and are not needed in the main conversion codeword table, andgrouping the additional DC control codewords.

[0020] Also, there is provided another allocation method of allocatingcodewords generated for source words to be recorded on a recordingmedium, the method including when a preceding codeword “a” and afollowing codeword “b” form a code stream X, allocating one of twoselectable codewords b1 and b2 as codeword “b”, in which codewords b1and b2 have opposite INV values which are parameters indicating whetherthe number of ‘1s’ contained in a codeword is an odd number or an evennumber and when the code stream of “a” and b1 is X1, and the code streamof “a” and b2 is X2, allocating codewords such that the INVs of X1 andX2 are maintained to be opposite when “a” or b1(b2) (b1 or b2) should bereplaced by other codewords in compliance with a predetermined boundarycondition given between codewords.

[0021] It is preferable that when the predetermined boundary conditionis that the number of continuous ‘0s’ between codewords should be atleast 2, and when the number of continuous ‘0s’ from the LeastSignificant Bit (LSB) of the codeword “a” in the Most Significant Bit(MSB) direction is 0, and the number of continuous ‘0s’ from the MSB ofthe codewords b1 or b2 in the LSB direction is 1, code changes of eitherthe codeword “a” or b1(b2) (b1 or b2) occur to satisfy the boundarycondition.

[0022] It is preferable that when the number of continuous ‘0s’ betweenthe codewords “a” and “b” is 1 or 0, the codeword “a” or “b” is changedsuch that the number of 0s forming the boundary is greater than 2 andless than 10.

[0023] It is preferable that the codeword “a” of the code stream X1 andthe codeword “a” of the code stream X2 are changed to other codewordssuch that the resulting codewords “a” of code streams X1 and X2 have thesame INV value, and as a result, by the INVs of codewords b1 and b2following the codewords “a” respectively, the INVs of the X1 and X2become different.

[0024] Also, there is provided an allocation method of allocatingcodewords of source words to be recorded on a recording medium, themethod including when a preceding codeword “b” and a following codeword“c” form a code stream Y, allocating one of two selectable codewords b1and b2 as the codeword “b”, wherein codewords b1 and b2 have oppositeINVs which are parameters indicating whether the number of ‘1s’contained in a codeword is an odd number or an even number and when thecode stream of b1 and “c” is Y1, and the code stream of b2 and “c” isY2, allocating codewords such that INVs of Y1 and Y2 are maintained tobe opposite when the codeword b1, b2, or “c” should be replaced byanother codeword in compliance with a predetermined boundary conditionbetween codewords.

[0025] It is preferable that when the predetermined boundary conditionis that the number of continuous ‘0s’ between codewords should be atleast 2, and when the number of continuous ‘0s’ from the LeastSignificant Bit (LSB) of the codeword “c” toward the Most SignificantBit (MSB) is 1, codeword “b” which does not satisfy the boundarycondition and is xxxxxxxxxxx1001 or xxxxxxxxxx10001 appears in both b1and b2.

BRIEF DESCRIPTION OF THE DRAWINGS

[0026] These and other objects and advantageous of the invention willbecome apparent and more readily appreciated from the followingdescription of the preferred embodiments, taken in conjunction with theaccompanying drawings of which:

[0027]FIG. 1 is a diagram of an example of a conventional modulationcode group;

[0028]FIG. 2 is a table showing characteristics of codewords included inthe modulation code group of FIG. 1;

[0029]FIG. 3 is a flowchart showing a method of generating andallocating codes according to an embodiment of the present invention;

[0030]FIG. 4 is a main code conversion table showing a variety ofcodeword groups and characteristics of codewords in each codeword group;

[0031]FIG. 5 is a corresponding code conversion table showing a varietyof the codeword groups for DC control and characteristics of thecodewords in each codeword group;

[0032]FIG. 6 is an auxiliary conversion table showing a variety of thecodeword groups for DC control and characteristics of the codewords ineach codeword group;

[0033]FIG. 7 is a diagram for showing what should be considered for therun length conditions between adjacent codewords “a” and “b”;

[0034]FIG. 8 is a table showing an example of changes in INV values ofcode streams before code conversion and after code conversion when therun length conditions described in FIG. 7 are not satisfied;

[0035]FIG. 9 is a diagram showing an example of code stream brancheshaving selective codewords b1 and b2 for DC control;

[0036]FIG. 10 is a graph showing a relationship between INV values of acode stream pair:

[0037]FIGS. 11A through 11E are the main code conversion code tables ofFIG. 4;

[0038]FIGS. 12A through 12J are the corresponding code conversion tablesfor DC control of FIG. 5;

[0039]FIGS. 13A and 13B are the auxiliary code conversion tables for DCcontrol of FIG. 7; and

[0040]FIG. 14 is a graph showing a difference between a frequencyspectrum when codewords of the corresponding code conversion table forDC control according to the embodiment of the present invention are usedin 25% of all of the codewords, and the frequency spectrum when priorart EFM+ modulation codewords are used.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0041] Reference will now be made in detail to the present preferredembodiments of the present invention, examples of which are illustratedin the accompanying drawings, wherein like reference numerals refer tothe like elements throughout. The embodiments are described in order toexplain the present invention by referring to the figures.

[0042]FIG. 3 is a flowchart showing a method of generating andallocating codes according to the present invention. According to themethod of generating and allocating codewords of source words to berecorded on a recording medium, the codewords satisfying predeterminedrun length conditions are generated and the generated codewords aregrouped according to each run length condition in operation 300. Thecodewords are allocated so that the code (word) streams for source wordsare capable of controlling DC components in operation 310. It isdetermined whether or not predetermined boundary conditions aresatisfied in the code stream in operation 320. If the conditions are notsatisfied, the codewords are replaced by codewords satisfying theboundary conditions while the DC control characteristics are maintainedeven when the original codewords are allocated in operation 330.

[0043] Code tables of the codewords for source code conversion areroughly divided into three types: 1) a main conversion table, 2) acorresponding conversion table for controlling DC components, and 3) anauxiliary conversion table for controlling the DC components.

[0044]FIG. 4 is a table showing a variety of codeword groups of a mainconversion table and the characteristics of codewords in each codegroup. It is assumed that “d” denotes the minimum run length limit of aseries of continuous “0”s of a codeword, “k” denotes the maximum runlength limit of a series of continuous “0”s of a codeword, “m” denotesthe number of bits of source data, “n” denotes the number of bits of acodeword after modulation of the source data, End Zero (EZ) denotes thenumber of ‘0s’ in a continuous sequence from the LSB of a codeword in adirection toward the MSB of the codeword, and Lead Zero (LZ) denotes thenumber of ‘0s’ in a continuous sequence from the MSB of a codeword in adirection toward the LSB of the codeword. For example, codewords thatsatisfy d=0, k=10, m=8, n=15, 0 EZ 8 are divided according to thefollowing LZ conditions:

[0045] 1) number of codewords satisfying 2 LZ 10: 177

[0046] 2) number of codewords satisfying 1 LZ 9: 257

[0047] 3) number of codewords satisfying 0 LZ 6: 360

[0048] 4) number of codewords satisfying 0 LZ 2: 262

[0049] If the number of bits of the source data satisfies m=8, thenumber of codewords for conversion should be 256 or more. However, incondition 1), the number of codewords does not amount to 256. Therefore,the number of codewords in condition 1) can amount to 256 by taking somecodewords from a condition having a surplus number of codewords. In thiscase, 83 codewords from the codewords satisfying group 3)∝s LZ conditionmay be taken and added to group 1). Then, the numbers of codewordsincluded in conditions 1) through 4) are 260, 257, 277(=360−83), and262, respectively, and satisfy the minimum number of modulationcodewords, that is, 256 for 8-bit source data. In the table of FIG. 4,Main Code Group 1 (MCG1) is the name of a code group containingcodewords satisfying condition 1) and some (83) codewords are taken frommain code group 3 (MCG3) satisfying condition 3). MCG2 and MCG4 are thenames of codewords satisfying condition 2), and 4), respectively. MCG3is the name of codewords satisfying condition 3), excluding the 83codewords taken by MCG1. In each of the main code groups MCG1 throughMCG4, only 256 codewords can be used as conversion codes for sourcecodes.

[0050]FIG. 5 is a corresponding conversion table showing a variety ofcodeword groups for the DC control and the characteristics of codewordsin each codeword group. For example, assuming that d=2, k=10, m=8, n=17,and 0 EZ 8, conversion code tables for controlling DC components mayinclude the following 4 groups (corresponding to DCG1, DCG2, DCG3, andDCG4 of FIG. 5, respectively) according to the LZ conditions:

[0051] 1) number of codewords satisfying 2 LZ 10: 375

[0052] 2) number of codewords satisfying 1 LZ 9: 546

[0053] 1) number of codewords satisfying 0 LZ 6: 763

[0054] 1) number of codewords satisfying 0 LZ 2: 556

[0055] Each group forming the corresponding conversion table forcontrolling the DC components should have at least 2 codewords thatselectively correspond to one source data, and therefore should have atleast 512 (=2⁸+2⁸) codewords for 8-bit source data. Since the number ofcodewords in the code group satisfying the LZ condition 1) is less than512, code group 1) can take surplus codewords from other code groupssatisfying other LZ conditions to amount to the number of 512. Forexample, in the above embodiment, code group 1 DCG1 may take 177codewords from the code group 3 DCG3 satisfying the condition 3) so asto have 552 (=375+177) codewords.

[0056]FIG. 6 is an auxiliary conversion table showing a variety ofcodeword groups for the DC control and the characteristics of codewordsin each code group. For example, among codewords satisfying d=2, k=10,m=8, and n=15, codewords satisfying 9 EZ 10, the remaining codewords ofthe main code conversion groups (MCGs), and codewords satisfying LZ=7, 8or LZ=4, 5 are used as codewords of auxiliary code groups (ACGs) forcontrolling the suppression of the DC components. The conditions forgenerating these codewords will now be explained in detail. Thefollowing conditions correspond to ACG1 through ACG4, respectively,which are names of the auxiliary conversion table for controlling thesuppression of the DC components:

[0057] 1) 5 codewords (satisfying 9 EZ 10 and LZ 0)+the remaining 4codewords (in the MCG1)=9 codewords,

[0058] 2) 5 codewords (satisfying 9 EZ 10 and LZ 0)+1 remainingcodewords (in the MCG1)=6 codewords,

[0059] 3) 5 codewords (satisfying 9 EZ 10 and LZ 1)+15 codewords(satisfying 7 LZ 8 and 0 EZ 8)+21 remaining codewords (in MCG3)=41codewords,

[0060] 4) 7 codewords (satisfying 9 EZ 10+the remaining 6 codewords inthe MCG4)+85 codewords (satisfying 3 LZ 5 and 0 EZ 8)=98 codewords.

[0061] When a codeword “a” and a codeword “b” are connected, thejunction where the two codewords are connected should satisfy a runlength (d, k) condition. FIG. 7 is a diagram showing what should beconsidered for the run length conditions when the codewords “a” and “b”are connected. Satisfying the run length condition means that in FIG. 7a value obtained by adding the end zero (EZ_a) of the codeword “a” andthe lead zero (LZ_b) of the codeword “b” is equal to or greater than theminimum run length “d” and equal to or less than the maximum run length“k”.

[0062]FIG. 8 is a table showing an example of changes in INV values ofcode streams (whose meaning will be described below) before codeconversion and after code conversion when the run length conditionsdescribed in FIG. 7 are not satisfied. The codeword “b” is determined ina group indicated by the EZ of the preceding codeword “a”. When thecodeword “a” or “b” is included in a code group, in which the number ofthe codewords is not enough to meet the condition, and is taken out fromother code groups, the (d, k) condition may not be satisfied. In thisexample, the EZ of codeword “a” changes to satisfy the run lengthcondition, which is referred to as the boundary rule. A variable INVvalue, which indicates whether the number of ‘is’ in a codeword streamis an even number or an odd number, may change from a previous INV valuewhile the codeword “a” is not changed, according to the boundary rule(condition). Due to this characteristic of the INV value or the boundaryrule, attention should be paid when a codeword is allocated according tocode conversion tables to control the suppression of the DC components.

[0063]FIG. 9 is a diagram showing an example of code stream brancheshaving selectable codewords b1 and b2 for the DC control. One of themajor features of the code conversion of the present invention is thatthe codewords of two code conversion tables that can be selected for theDC control are allocated so that they have opposite INV characteristics(values). When the previous INV value changes according to the boundaryrule as described above, if the INV values of both the codewords in thetwo selectable code conversion tables change, then there will be noproblem. Otherwise, characteristics of codewords having opposite INVvalues cannot be obtained. For this reason, a code conversion table isdesigned to consider the following.

[0064] First, in FIG. 9, at a junction A where the codeword “a” and thecodeword “b” are connected to each other, if b1 and b2, which can beselected as the codeword “b”, are codewords taken out from DCG 11 andDCG12, respectively, the codewords are regrouped in the codewords DCG1according to the code conversion table shown in FIG. 5 after beingseparated from the codewords DCG3 to correspond to the same source codebut have different INV values. If the codewords b1 and b2 are codewordsof MCG1 and MCG2, respectively, then codewords in which LZ_b1 (thenumber of LZs of codeword b1) and LZ_b2 (the number of LZs of codewordb2) are 1 are allocated on the location. By doing so, when the EZ of thecodeword “a” is ‘0’, according to the boundary rule, the INV value ofthe codeword “a” is changed in both the code stream containing thecodeword b1 and the code stream containing the codeword b2, or the INVvalue of the codeword “a” does not change in either the code streamcontaining the codeword b1 or the code stream containing the codewordb2, such that the INV values of the two code streams are maintained tobe opposite. An example is as follows: source data 250 224 27 codestream1 000001000010001 000001000001001 010010010000000 (beforeconversion) (MCG3) (MCG1) (MCG1) code stream1 000001000010001000001000001000 010010010000000 (after conversion) INV1 1 1 0 codestream2 000001000010001 000001000001001 010010000000000 (beforeconversion) (MCG3) (MCG1) (ACG1) code stream2 000001000010001000001000001000 010010000000000 (after conversion) INV2 1 1 1

[0065] Next, in another junction B of FIG. 9, that is, at the junction Bwhere the codeword “b” and codeword “c” are connected to each other, ifthe codewords b1 and b2 are respectively included in code conversiontables DCG11 and DCG12, DCG21 and DCG22, DCG31 and DCG32, DCG41 andDCG42, MCG1 and ACG1, MCG2 and ACG2, MCG3 and ACG3, or MCG4 and ACG4,and (xx)xxxxxxxxxxx1001 or (xx)xxxxxxxxxx10001 as shown in FIG. 8, theINV value may change according to the boundary rule due to the LZ of thefollowing codeword “c”. Therefore, these codewords b1 and b2 areallocated to the location for corresponding same source data in eachtable such that the INV values of the two code streams are maintained tobe opposite. An example is as follows: source data 250 152 210 codestream1 000001000010001 01000000010001001 000000100000001 (beforeconversion) (MCG3) (DCG11) (MCG1) code stream1 00000100001000001000000010001001 000000100000001 (after conversion) INV1 0 0 0 codestream2 000001000010001 01001000010001001 010000001001001 (beforeconversion) (MCG3) (DCG12) (MCG1) code stream2 00000100001000001001000010001001 010000001001001 (after conversion) INV2 0 1 1

[0066] For the junctions A and B of FIG. 9, the codewords are firstallocated to the location corresponding same source data in each codeconversion table (DCG11 and DCG12 or MCG1 and ACG1) considering theabove. Referring to the following example, in the junction B, accordingto the boundary rule, the INV values of code stream 1 and code stream 2are maintained to be opposite and the INV values of code stream 3 andcode stream 4 are maintained to be opposite. Also, at the junction B,according to the boundary rule, the INV values of code stream 1 and codestream 3 are maintained to be opposite and the INV values of code stream2 and code stream 4 are maintained to be opposite. source data 250 152 7code stream1 000001000010001 01000000010001001 010000010010001 (beforeconversion) (MCG3) (DCG11) (MCG1) code stream1 00000100001000001000000010001000 010000010010001 (after conversion) INV1 0 1 1 codestream2 000001000010001 01000000010001001 010010010010001 (beforeconversion) (MCG3) (DCG11) (AGG1) code stream2 00000100001000001000000010001000 010010010010001 (after conversion) INV2 0 1 0 codestream3 000001000010001 01001000010001001 010000010010001 (beforeconversion) (MCG3) (DCG12) (MCG1) code stream3 00000100001000001001000010001000 010000010010001 (after conversion) INV3 0 0 0 codestream4 000001000010001 01001000010001001 010010010010001 (beforeconversion) (MCG3) (DCG12) (ACG1) code stream4 00000100001000001001000010001000 010010010010001 (after conversion) INV4 0 0 1

[0067] As described above, considering changes in the INV value of acodeword due to the boundary rule in a codeword stream, codewords areallocated so that the INV values (polarities) of a codeword pair aftermodulation of the source data is always maintained to be opposite. FIG.10 is a graph showing the relationship of the INV values of this codestream pair. If codewords are allocated such that the INV values of acode stream pair are always opposite, a codeword can be selected so thata code stream having the DC components between the code stream pair isformed.

[0068] Exceptions to the rule that INV values are maintained to beopposite at the junction A of FIG. 9 may occur when the amount of thesource data is from 251 to 255 in the code conversion table forcontrolling the DC components. In such exceptional cases, the CSV signsof the codewords are made to be opposite so that the difference betweenDSV values in the code stream pair is made.

[0069]FIGS. 11A through 11E are the main conversion tables in whichcodewords are generated and allocated after the conditions describedabove are condsidered.

[0070]FIGS. 12A through 12J are the corresponding conversion tables forDC control in which codewords are generated and allocated after theconditions described above are considered.

[0071]FIGS. 13A and 13B are the auxiliary code conversion tables for theDC control in which codewords are generated and allocated after theconditions described above are considered.

[0072]FIG. 14 is a graph showing the difference between a frequencyspectrum when codewords of the code conversion table for the DC controlaccording to the embodiment of the present invention-are used in 25% ofall of the codewords, and another frequency spectrum when prior art EFM+modulation codewords are used. The graph shows that in a low frequencyband, the frequency spectrum of the code words (modulated code stream)according to the present invention is almost the same as the frequencyspectrum of the EFM+, which indicates that the code stream of thepresent invention has almost the same capability of suppressing the DCcomponents as that of the EFM+ method.

[0073] Accordingly, since the present invention uses 15-bit codes as themain conversion code and selectively uses 17-bit DC control codes forcontrolling DC components, the present invention has better efficiencyin recording density than the prior art EFM+ code and has the same DCsuppression capability as the EFM+ code.

[0074] According to the present invention, by using a short codewordhaving less bits as a main conversion codeword, high efficiency isachieved in recording density.

[0075] Also, when codewords which do not satisfy the run lengthconditions are replaced by other codewords, the codewords are allocatedso that the DC suppression capability of the code stream can bemaintained, and therefore a higher DC suppression capability of the codestream is provided.

[0076] Although a few preferred embodiments of the present inventionhave been shown and described, it would be appreciated by those skilledin the art that changes may be made in this embodiment without departingfrom the principles and sprit of the invention, the scope of which isdefined in the claims and their equivalents.

What is claimed is:
 1. A method of generating and allocating codewordsof source words which are to be recorded on a recording medium, themethod comprising: generating codewords satisfying predetermined runlength conditions and grouping codewords according to each run lengthcondition; and allocating the codewords in a code stream such that acodeword for the source word controls suppression of DC components ofthe code stream.
 2. The method of claim 1, further comprising: when apredetermined boundary condition is not satisfied in the code stream,allocating the codewords such that the codewords which satisfy theboundary condition and maintain the DC control characteristics replaceinitial codewords.
 3. The method of claim 1, wherein in order to makethe code stream controlling the suppression of the DC components,allocating the codewords such that a pair of the code stream and anadditional code streams having opposite INV characteristics are formed,where the INV characteristics indicate whether the number of ‘1s’ is anodd number or an even number.
 4. The method of claim 1, wherein thegenerating of the codewords comprises: generating the codewordssatisfying the length of a predetermined first codeword andpredetermined run length conditions, and grouping the codewordsaccording to each predetermined run length condition to generate a mainconversion codeword table; generating DC control codewords satisfyingthe length of a predetermined second codeword, and predetermined runlength conditions in order to control the DC components in the codestream, and grouping the DC control codewords, and generating a codeconversion table for controlling the DC components; and generatingadditional DC control codewords by taking the codewords which satisfythe predetermined run length conditions and are not needed in the mainconversion codeword table, and grouping the additional DC controlcodewords.
 5. The method of claim 4, wherein when the bit length of thesource word is 8, the length of a codeword in the main conversion codetable is 15 bits.
 6. The method of claim 5, wherein the main conversioncode table contains groups of codewords, the codewords each having from2 to 10 Lead Zeros (LZs), from 1 to 9 LZs, from 1 to 6 LZs, and from 0to 2 LZs, while having from 0 to 8 End Zeros (EZs).
 7. The method ofclaim 6, wherein among the groups of the main conversion code table, agroup having a lesser number of codewords than the minimum number ofcodewords for converting the source data takes surplus codewords from agroup having a greater number of codewords than the minimum number ofcodewords so as to amount to the minimum number of codewords.
 8. Themethod of claim 5, wherein the length of the codewords of the DC controlconversion code table is 17 bits.
 9. The method of claim 8, wherein theDC control conversion code table contains groups of codewords, thegroups formed of a group of codewords of which LZ is from 2 and to 10, agroup of codewords of which LZ is from 1 to 9, a group of codewords ofwhich LZ is from 0 to 6, and a group of codewords of which LZ is from 0to 2, while EZ is from 0 to
 8. 10. The method of claim 9, wherein eachcode group of the DC control conversion table has as many codewords as asource word can correspond to pairs of codewords, each pair of codewordshas opposite INV characteristics and is selectable.
 11. The method ofclaim 10, wherein among the groups of the DC control conversion codetable, a group having a lesser number of codewords than the minimumnumber of needed codewords takes surplus codewords from a group having agreater number of codewords than the minimum number of codewords, so asto have equal to or greater than the minimum number of codewords. 12.The method of claim 8, wherein the auxiliary DC control conversion tablecomprises: a group of codewords, each having a length of 15 bits, havingfrom 9 to 10 EZs, and having at least one LZ, and codewords which aretaken from surplus codewords of the first main conversion code group; agroup of codewords, each having a length of 15 bits, having from 9 to 10EZs, and having at least one LZ, and codewords which are taken fromsurplus codewords of the second main conversion code group; a group ofcodewords, each having a length of 15 bits, having from 9 to 10 EZs, andhaving no LZ, the surplus codewords of the third main conversion codegroup, and having 7 to 8 LZs, or having 0 to 8 EZs; and a group ofcodewords, each having a length of 15 bits, and having 9 or 10 EZs, thesurplus codewords of the fourth main conversion code group, and having 3to 8 LZs and 0 to 8 EZs.
 13. The method of claim 12, wherein when thecode stream pairs are a, b1, c and a, b2, c, respectively, and b1 and b2are DC control codewords having opposite INV characteristics, codewordsare allocated such that the INV characteristics of code streams afterconversion are maintained to be opposite even if code changes of a, b1,b2, or c occur due to violation of the predetermined run length betweena, and b1 (b2) or b1 (b2) and c.
 14. A method in a run length limitedcoding system generating codewords to be recorded on a recording medium,the method comprising: arranging the codewords disposed adjacent to eachother to have different opposite polarities from each other, thedifferent opposite polarities representing one of an odd number and aneven number of 1s in each codeword; and arranging the codewords disposedto have a boundary condition representing that the number of continuous0s between adjacent codewords is more than a predetermined number.
 15. Amethod in a run length limited coding system generating codewords in afirst code group and a second code group to be recorded on a recordingmedium, the method comprising: selecting from the first code group oneof the cordwords having two different INV polarities representing one ofan odd number or an even number of is in each codeword; and allocatingthe selected one of the codewords of the first code group into thesecond code group to be arranged and connected to a codeword of thesecond code group having different INV polarity from the selected one ofthe cordwords of the first code group.
 16. The method of claim 15,wherein the allocating of the selected one comprises selecting thesecond code group when the number of the codewords of the second codegroup is less than a predetermined value.
 17. The method of claim 15,wherein the selecting of the one of the cordwords comprises selectingthe first code group when the number of the codewords of the first codegroup is more than a predetermined value.
 18. The method of claim 15,further comprising: generating the first code group and second grouphaving adjacent codewords to have a boundary condition representing thatthe number of continuous 0s between the adjacent codewords is more thana predetermined number.